<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>DWR 测试Title</title>
    <script src="<%=request.getContextPath()%>/ta/resource/external/plugin/ta-core-all/jquery-1.11.0.min.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath()%>/dwr/engine.js"></script>
    <script src="<%=request.getContextPath()%>/dwr/util.js"></script>
    <script src="<%=request.getContextPath()%>/dwr/interface/dwrController.js"></script>
    <script>
        $(document).ready(function () {
            dwr.engine.setActiveReverseAjax(true);
            dwr.engine.setNotifyServerOnPageUnload(true);
            dwr.engine.setErrorHandler(function(message, ex){
                dwr.engine._debug("Error: " + ex.name + ", " + ex.message, true);
            });
            dwrController.onPageLoad("123456");
        });
        /**
         * 后台推送调用方法
         * @param message
         */
        function showMessage(message) {
            console.log(message);
        }
        function fnadd1(){
        	dwrController.add1();
        }
        function fnadd2(){
        	dwrController.add2();
        }
        function fnadd3(){
        	dwrController.add3();
        }
    </script>
</head>
<body>
    <h1>DWR测试</h1>
    <button id="b1"  onclick="fnadd1()" style="height:50px;width:80px">总队列</button>
    <button id="b2"  onclick="fnadd2()" style="height:50px;width:80px">dwr队列</button>
    <button id="b3"  onclick="fnadd3()" style="height:50px;width:80px">MQ队列</button>
</body>
</html>
